package com.yuke.cloud.service.cmc.service.impl;

import com.yuke.cloud.service.cmc.dao.CmsAppVerMapper;
import com.yuke.cloud.service.cmc.entity.CmsAppVer;
import com.yuke.cloud.service.cmc.service.CmsAppVerService;
import com.yuke.cloud.common.core.support.BaseService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;


/**
 * Created by wg on 2019/07/23.
 */
@Service
@Transactional
public class CmsAppVerServiceImpl extends BaseService<CmsAppVer> implements CmsAppVerService {
    @Resource
    private CmsAppVerMapper cmsAppVerMapper;

    @Override
    public CmsAppVer getNewVerInfo(Byte appType,Byte appProject) {
        CmsAppVer cmsAppVer = null;
        List<CmsAppVer> list = cmsAppVerMapper.getNewVerInfo(appType,appProject);

        if (list != null && list.size() > 0) {
            cmsAppVer = list.get(0);
        }

        return cmsAppVer;
    }
}
